case = 0;
while True:
    try:
        n, f = map(int, input().strip().split(' '))
        bill = list()
        for _ in range(n):
            bill.append(int(input()))
        cost = sum(bill)
        case += 1
        print("Bill #{} costs {}: each friend should pay {}\n".format(case, cost, cost//f))
    except Exception:
        break;
